<template>
	<view class="box">
		<view class="list">
			<view class="list_li" @tap="tolistdetails(item.id)" v-for="(item,index) in selectList" :key="index">
				<view class="time">
					<view class="day">{{item.addTime.split(" ")[0].split("-")[2]}}</view>
					<view class="year">{{item.addTime.split(" ")[0].split("-")[0]}}/{{item.addTime.split(" ")[0].split("-")[1]}}</view>
				</view>
				<view class="list_txt">{{item.titile}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selectList:[]
			}
		},
		// 页面加载
		onLoad(options) {
			console.log(options.id)
			
			this.loadData();
		},
		methods: {
			loadData(){
				this.tui.request(
					'/app/material/qianyanNewsList',
					'GET', 
					{
						materialType:"3",
					},
					false,
					false,
					false,
				).then(res => {
					console.log(res)
					this.selectList = res.data.list
					
				}).catch(err => {
					console.log(err)
				});
			},
			tolistdetails: function(itemid) {
				uni.navigateTo({
					url: "/pages/newsFlash/newsDetails?id=" + itemid,
				})
			}
		}
	}
</script>

<style>
	.list_li {
		width: 100%;
		display: flex;
		align-items: center;
		padding-top: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid #cccccc;
	}

	.list_li .time {
		padding-left: 15px;
		font-size: 16px;
		color: #333333;
		text-align: center;
		background:rgba(250,250,250,1)
	}

	.day {
		font-size:35px;
		font-family:Source Han Sans CN;
		font-weight:500;
		color:rgba(1,2,6,1);
		line-height:40px;
	}
	.year{
		font-size: 12px;
		color: #010206;
	}

	.list_li .list_txt {
		font-size: 16px;
		color: #333333;
		padding-left: 13px;
		padding-right: 8px;
	}
</style>
